import request from "@/utils/request";
export function listRoom(query) {
  return request({
    url: "/room/list",
    method: "get",
    params: query
  });
}
//分页查询
export function listRoomPage(query) {
  return request({
    url: "/room/page",
    method: "get",
    params: query
  });
}

//查询房间
export function searchRoom(roomNo) {
  return request({
    url: "/room/queryRoomByRoomNo/" + roomNo,
    method: "get"
  });
}

//修改房间
export function editRoom(data) {
  return request({
    url: "/room",
    method: "put",
    data: data
  });
}

//添加房间
export function addRoom(data) {
  return request({
    url: "/room",
    method: "post",
    data: data
  });
}

//删除房型
export function deleteRoom(roomId) {
  return request({
    url: "/room/delete/" + roomId,
    method: "delete"
  });
}

//批量删除房型
export function batchdelete(ids) {
  return request({
    url: "/room/deleteMoreRoom/",
    method: "delete",
    data: ids
  });
}
